
#ifndef CHANNEL_H
#define CHANNEL_H

#include "header.h"
#include <qlistview.h>
class MainWindow;
class MyLabel;
class QBuffer;
class QHttp;
class QProcess;

class Channel:public QListView
{
    Q_OBJECT			///
  public:
    Channel (QWidget * parent = 0, const char *name = 0, WFlags f = 0);
     ~Channel ();
    void toggleChannelSort ();
    void toggleNullChannel ();
    void switchChannelColor (int);
    int Max[N_COLUMNS];
    void updateOpenState ();
      QValueList < char >stateopen;
    bool SopMatch (QString &, QString &, QString &);

  protected:
    void mouseMoveEvent (QMouseEvent * e);

  private:
      MainWindow * mainwindow;
    QBuffer *bufchannel;
    QHttp *http;
    MyLabel *popup;
    QProcess *wget;


    private slots:		///
    void onListItemClicked (QListViewItem *);
    void onRightButtonClicked (QListViewItem *, const QPoint &, int);
    void onMouseMoved (QListViewItem *);
    void wgetStdout ();
    void onWgetExit ();

    public slots:		////
    void onButtonChannelToggled (bool);

};

#endif
